package com.zimu.api.controller;


import com.zimu.api.service.AnalysisInterfaceService;
import com.zimu.common.model.common.BaseResponse;
import com.zimu.common.model.common.ResultUtils;
import com.zimu.common.model.vo.InterfaceInfoVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/analysis")
public class AnalysisInterfaceController {
    @Resource
    AnalysisInterfaceService analysisInterfaceService;
    @GetMapping("/top/interface/invoke")
    public BaseResponse<List<InterfaceInfoVo>> topInterfaceInvoke(HttpServletRequest request){
        List<InterfaceInfoVo> list = analysisInterfaceService.getTopInterfaceInvoke(request);
        return ResultUtils.success(list);
    }

}
